<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                template="./template/template_padrao.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="conteudo">
        <p:panel header="Cadastro de Sprint">
            Produto: #{sprintMB.produto.nome}
            <br/><br/>
            <p:messages id="msgCad"/>
            <h:form id="cadastroSprint">
                <h:panelGrid>
                    <h:outputText value="Nome: *"/>
                    <p:inputText value="#{sprintMB.sprint.nome}" size="60" required="true"
                                 requiredMessage="Nome é um campo Obrigatório"/>
                    <h:outputText value="Objetivo: *" style="font-weight: bold"/>
                    <p:inputText value="#{sprintMB.sprint.objetivo}" size="80" required="true"
                                 requiredMessage="Objetivo é um campo Obrigatório"/>
                    <h:outputText value="Data Início: *" /> 
                    <p:calendar value="#{sprintMB.sprint.dataInicio}" required="true" pattern="dd/MM/yyyy HH:mm" effect="fold" navigator="true" display="inline">
                       <p:ajax event="dateSelect" listener="#{spintMB.handleDataInicioSelect}" update=":msgCad" />
                    </p:calendar>
                    <h:outputText value="Data Fim: *" /> 
                    <p:calendar value="#{sprintMB.sprint.dataFim}" required="true" pattern="dd/MM/yyyy HH:mm" effect="fold" navigator="true" display="inline">
                       <p:ajax event="dateSelect" listener="#{sprintMB.handleDataFimSelect}" update=":msgCad" />
                    </p:calendar>
                    <h:outputText value="Descrição:" style="font-weight: bold;margin-right: 20px;"/>
                    <p:inputTextarea value="#{sprintMB.sprint.descricao}" cols="40" />
                    <p:separator style="margin:10px 0;"/>
                    <h:panelGrid columns="2" style="float: right">
                        <p:commandButton value="Salvar" action="#{sprintMB.salvar()}" update=":msgCad :cadastroSprint"/>
                    </h:panelGrid>
                </h:panelGrid>
            </h:form>
        </p:panel>

    </ui:define>
</ui:composition>